<?php
    echo $erreur;
    $dropdown_parent=array(
    'table_name' => 'zoo_categories',
    'key_field' => 'id',
    'value_field' => 'nomfr',
    'init_data' => array('key'=>'0','name'=>'(Select parent)'),
    'where'=> array('parent'=>0)
    );
    if($detail_category->num_rows()>0)
    {
        $row= $detail_category->row();
        $selected_cat=$row->id;
    }
    $image_path = './assets/photos/' . $row->img;
    if ($row->img != '') {
        if (file_exists($image_path)) {
            $image_path = base_url() . 'assets/photos/' . $row->img;
        } else {
            $image_path = root_url('zoo-market') . 'assets/noimage.gif';
        }
    } else {
        $image_path = root_url('zoo-market') . 'assets/noimage.gif';
}
?>

<div id="wrapper-content">
         <table class="titrepage" width="100%">
        <tr>
            <td >Information du catégorie</td>
        </tr>
    </table>
   
        <?php echo form_open_multipart(site_url('product_admin/edit_category'). '/' . $row->id); ?>
        <table align="center" width="100%" class="list" cellpadding="10px" cellspacing="0">
            <tr>
                <td>Nom:</td>
                <td><input type="text" name="name" size="30" value="<?php echo $row->nomfr; ?>"></td>
                <td><?php echo form_error('name') ?><td>      
            </tr>
             <tr>
                <td >Image:</td>
                <td><img src="<?php echo $image_path;?>" height="80"/><input size="30" type="file" name="userfile" id="userfile" size="25"/></td>

            </tr>
            <tr>
               <td></td> <td><input type="submit" name="submit" value=" Enregistrer "/></td>
            </tr>
        </table>

    <?php echo form_close()?>

</div>
